package com.yanqu.road.entity.activity.commonteam.config;

import com.yanqu.road.utils.property.PropertyHelper;
import com.yanqu.road.utils.string.StringUtils;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

public class ActivityTeamConfig {

    private int activityId;     //活动id
    private int id;             //id
    private String param;       //参数名
    private String value;       //参数值

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        this.param = param;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public int getIntValue() {
        return Integer.parseInt(value.trim());
    }

    public long getLongValue() {
        return Long.parseLong(value.trim());
    }

    public ActivityTeamConfig() {}

    public ActivityTeamConfig(ResultSet rs) throws SQLException {
        this.setActivityId(rs.getInt("activityId"));
        this.setParam(rs.getString("param"));
        this.setValue(rs.getString("value"));
        this.setId(rs.getInt("id"));
    }
}
